import request from '@/utils/request'

// 注册
export const register = (data) => {
  return request({
    url: '/auth/register',
    method: 'post',
    data
  })
}

// 登录
export const login = (data) => {
  return request({
    url: '/auth/login',
    method: 'post',
    data
  })
}

// 刷新token
export const refreshToken = (data) => {
  return request({
    url: '/auth/refresh-token',
    method: 'post',
    data
  })
}

// 忘记密码
export const forgetPassword = (data) => {
  return request({
    url: '/auth/forget-password',
    method: 'post',
    data
  })
}

// 发送短信验证码
export const sendSmsCode = (data) => {
  return request({
    url: '/auth/send-sms-code',
    method: 'post',
    data
  })
}

// 验证手机验证码
export const verifyPhoneCode = (data) => {
  return request({
    url: '/auth/verify-phone-code',
    method: 'post',
    data
  })
}

// 重置密码
export const resetPassword = (data) => {
  return request({
    url: '/auth/forget-password',
    method: 'post',
    data
  })
}

// 验证用户身份（邮箱和手机号匹配）
export const verifyUserIdentity = (data) => {
  return request({
    url: '/auth/validate-user-info',
    method: 'post',
    data
  })
} 